import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const countPinia = ref(0)
  const doubleCount = computed(() => countPinia.value * 2)
  function increment() {
    countPinia.value++
  }

  return { countPinia, doubleCount, increment }
})
